﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class Chauffeur_open : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            SqlConnection strcon = Class1.DBconnection();
            strcon.Open();
            SqlDataAdapter sda = new SqlDataAdapter("select * from tb_Chauffeur where id="+Request["id"], strcon);
            DataSet ds = new DataSet();
            sda.Fill(ds, "tb_Chauffeur");
            DataRowView rowview = ds.Tables["tb_Chauffeur"].DefaultView[0];
            LBLType.Text = rowview["Type"].ToString();
            LBLChauffeurName.Text = rowview["ChauffeurName"].ToString();
            LBLHealth.Text = rowview["Health"].ToString();
            LBLDriveAge.Text = rowview["DriveAge"].ToString();
            LBLTruckType.Text = rowview["TruckType"].ToString();
            LBLArea.Text = rowview["Area"].ToString();
            LBLTel.Text = rowview["Tel"].ToString();
            LBLEffectDate.Text = rowview["EffectDate"].ToString();
            LBLChauffeurNow.Text = rowview["ChauffeurNow"].ToString();
            LBLBewrite.Text = rowview["Bewrite"].ToString();
            ds.Clear();
            strcon.Close();
        }
    }
}
